/// @description 绘制输入框
// You can write your code in this editor

//绘制背景
draw_set_color(0xff808080);
draw_rectangle(x, y, x+width, y+height, false);

//鼠标选中
if(focus)
{
	draw_set_color(0xff000000);
	draw_rectangle(x, y, x+width, y+height, true);
}

//绘制文字
if(text!="")
{
	var w = string_width(text);
	var h = string_height(text);
	draw_set_color(0xff000000);
	draw_text(x+(width-w)/2, y+(height-h)/2, text);
}
else
{
	var w = string_width(hint);
	var h = string_height(hint);
	draw_set_color(0x80ffffff);
	draw_text(x+(width-w)/2, y+(height-h)/2, hint);
}
